#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a = 0;
	while (scanf("%d", &a))
	{
		int i = 0, j = 0;
		for (i = 0; i <= a; i++)
		{
			for (j = 0; j < 2 * a - 2 * i; j++)
			{
				printf(" ");
			}
			for (j = 0; j < i + 1; j++)
			{
				printf("*");
			}
			printf("\n");
		}
		for (i = 0; i < a; i++)
		{
			for (j = 0; j < 2 * (i + 1); j++)
			{
				printf(" ");
			}
			for (j = 0; j < a - i; j++)
			{
				printf("*");
			}
			printf("\n");
		}
	}
}

int main()
{
	int arr[7] = { 0 };
	for (int i = 0; i < 7; i++)
	{
		scanf("%d", &arr[i]);
	}
	int min = arr[0];
	int max = arr[0];
	for (int i = 1; i < 7; i++)
	{
		if (min > arr[i])
			min = arr[i];
		if (max < arr[i])
			max = arr[i];
	}
	double n = 0;
	int sum = 0;
	for (int i = 0; i < 7; i++)
	{
		sum = sum + arr[i];
	}
	sum = sum - min - max;
	n = sum / 5.0;
	printf("%.2lf", n);
}

